      SUBROUTINE NSTAT ( IX, IY, NUM, DOWN )
C*
C*                  *******************************
C*                  *******************************
C*                  **                           **
C*                  **          NSTAT            **
C*                  **                           **
C*                  *******************************
C*                  *******************************
C*
C*     SUBPROGRAM :
C*          NAE STATUS
C*
C*     AUTHOR :
C*          ART RAGOSTA
C*          MS 207-5
C*          AMES RESEARCH CENTER
C*          MOFFETT FIELD, CALIF   94035
C*          (415) 694-5578
C*
C*     PURPOSE :
C*          TO DISPLAY THE STATUS OF THE NAE EDITOR.
C*
C*     METHODOLOGY :
C*          USE VT-100 CONTROL SEQUENCES.
C*
C*     INPUT ARGUMENTS :
C*          IX    - X LOCATION OF CURSOR
C*          IY    - Y LOCATION OF CURSOR
C*          NUM   - NUMBER OF ENTRIES IN ARRAYS
C*          DOWN  - IS DOWN THE DEFAULT DIRECTION?
C*
C*     OUTPUT ARGUMENTS :
C*          NONE
C*
C*     INTERNAL WORK AREAS :
C*          NONE
C*
C*     COMMON BLOCKS :
C*          NONE
C*
C*     FILE REFERENCES :
C*          NONE
C*
C*     DATA BASE ACCESS :
C*          NONE
C*
C*     SUBPROGRAM REFERENCES :
C*          LIB$PUT_SCREEN,  LIB$SET_CURSOR,  LIB$SET_SCROLL
C*
C*     ERROR PROCESSING :
C*          NONE
C*
C*     TRANSPORTABILITY LIMITATIONS :
C*          NOT TRANSPORTABLE.
C*
C*     ASSUMPTIONS AND RESTRICTIONS :
C*          NONE
C*
C*     LANGUAGE AND COMPILER :
C*          ANSI FORTRAN 77
C*
C*     VERSION AND DATE :
C*          VERSION I.0      4-FEB-85
C*
C*     CHANGE HISTORY :
C*           4-FEB-85    INITIAL VERSION
C*
C***********************************************************************
C*
      CHARACTER *79 T
      CHARACTER *1 ESC
      LOGICAL DOWN
      DATA ESC/27/
C
      IF ( DOWN ) THEN
         WRITE ( T, 900 ) NUM
      ELSE
         WRITE ( T, 910 ) NUM
      ENDIF
C
C --- PUT MESSAGE ON LINE 1 IN REVERSE VIDEO
C
      IFLAG = 2
      ISTAT = LIB$PUT_SCREEN ( T, 1, 1, IFLAG )
C
C --- RESTORE CURSOR LOCATION AND SET SCROLL REGION
C
      ISTAT = LIB$SET_CURSOR ( IY, IX )
      ISTAT = LIB$SET_SCROLL ( 2, 24 )
      RETURN
900   FORMAT(
     $'   Entries=',I3,
     $'          Direction=Down         Commands=A,B,D,E,I,R,S,?,^Z ')
910   FORMAT(
     $'   Entries=',I3,
     $'          Direction=Up           Commands=A,B,D,E,I,R,S,?,^Z ')
      END
C
C---END NSTAT
C
